<template>
  <div id="app">
    <router-view />
     <div v-show="header">
    <Bottom></Bottom>
     </div>
  </div>
</template>
<script>
import Bottom from '@/components/bottom/Bottom'
export default {
  components: { Bottom },
  data() {
    return {
      userIdentity: false, //登录用户是否为管理员
      userLoginInif: this.$store.state.loginUserInfi,
      userQx: this.$store.state.userQx,
    };
  },
  mounted() {
    this.userLoginInif ? "" : sessionStorage.clear();
    this.userLoginInif ? "" : sessionStorage.clear();
    // 验证登录人员是否为管理员
    this.userIdentity = this.userLoginInif.roles.some(
      (item) => item.code == "sys_admin"
    );
  },
  computed: {
    header() {
      return this.$route.meta.header;
    },
  },
  // watch: {
  //   $route(to, from) {
  //     if (this.userIdentity) {
  //       if (to.path == "/permissions" || "/channel") {
  //         this.$router.push(to.path);
  //       }
  //     } else {
  //       this.$router.push(from.path);
  //     }
  //   },
  // },
};
</script>
<style lang="less">
* {
  margin: 0;
  padding: 0;
  letter-spacing: 1px;
}
.el-message {
  top: 20px !important;
}
#app {
  width: 100%;
  height: 100%;
}
body {
  background: url(assets/tfxq/imgs/backdrop.png) no-repeat top center;

  background-size: 100% 100%;
}
.scrollbar {
  width: 30px;
  height: 300px;
  margin: 0 auto;
}

::-webkit-scrollbar {
  /*滚动条整体样式*/
  width: 6px; /*高宽分别对应横竖滚动条的尺寸*/
  height: 6px;
}
::-webkit-scrollbar-thumb {
  /*滚动条里面小方块*/
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  background: #007fff;
}
::-webkit-scrollbar-track {
  /*滚动条里面轨道*/
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  background: #ededed;
}
</style>
